package com.niiwoo.civet.account.service.withholdProtocol;

import com.niiwoo.civet.account.dto.response.ApplyWithholdProtocolResponseDTO;
import com.niiwoo.civet.account.dto.response.ConfirmWithholdProtocolResponseDTO;
import com.niiwoo.civet.account.dto.response.WithholdProtocolResultDTO;

/**
 * 协议代扣接口
 *
 * @author xiaoyaocai
 * @create 2018-05-14
 **/
public interface WithholdProtocolDubboService {

    /**
     * 申请协议代扣
     */
    public ApplyWithholdProtocolResponseDTO applyWithholdProtocol(String userId, String orgId);

    /**
     * 确认协议代扣
     */
    public ConfirmWithholdProtocolResponseDTO confirmWithholdProtocol(Long orderId, String securityCode);

    /**
     * 获取用户代扣签约结果
     * @param userId
     */
    public WithholdProtocolResultDTO getWithholdProtocolResultForLocal(String userId, String orgId);

    /**
     * 查询用户代扣签约结果（存管查询）
     * @param userId
     */
    public WithholdProtocolResultDTO getWithholdProtocolResultForRemote(String userId, String orgId);

    /**
     * 异常补偿
     */
    public void autoCompensation();

    /**
     * 校验已经签约数据
     */
    default void checkUserWithholdProtocolSigned(){
        throw new UnsupportedOperationException("unimplemented");
    }
}
